<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name=”viewport” content=”width=device-width, initial-scale=1, maximum-scale=1″>
    <title>一珏文创</title>
    <style>
        html,body {
            padding: 0;
            margin: 0;
            width: 100%;
            height: 100%;
        }
        .buttons {
            width: 100%;
            position: absolute;
            top: 13%;
            z-index: 2000;
        }
        .btn0 {
            width: 100%;
            text-align: center;
        }
        .btn1 {
            position: absolute;
            left: 6%;
        }
        .btn2 {
            position: absolute;
            width: 100%;
            text-align: center;
            top: 480px;
        }
        .btn3 {
            right: 6%;
            position: absolute;
        }
        .bg {
            width: 100%;
            height: 100%;
        }
        .bg .top {
            width: 100%;
            height: 10%;
            background-color: #C9151E;
        }
        .bg .main {
            position: absolute;
            top: 10%;
            width: 100%;
            height: 90%;
        }
        .title {
            position: absolute;
            width: 100%;
            bottom: 24%;
            text-align: center;
        }
        .info {
            position: absolute;
            width: 100%;
            bottom: 3%;
            text-align: center;
        }
        .fish1 {
            position: absolute;
            left: 10%;
            z-index: 1000;
            top: 54%;
        }
        .fish2 {
            position: absolute;
            right: 4%;
            z-index: 1000;
            top: 69%;
        }
        .cloud1 {
            position: absolute;
            top: 18%;
            left: 9%;
            width: 269px;
        }
        .cloud2 {
            position: absolute;
            top: 12%;
            left: 44%;
        }
        .cloud3 {
            position: absolute;
            top: 34%;
            left: 9%;
        }
        .cloud4 {
            position: absolute;
            top: 75%;
            left: 4%;
            width: 330px;
        }
        .cloud5 {
            position: absolute;
            top: 55%;
            left: 55%;
            width: 375px;
        }
    </style>

</head>
<body>
    <div class="bg">
        <div class="top"></div>
        <img class="main" src="static/menu-bg.jpg">
    </div>
    <div class="buttons">
        <div class="btn0">
            <img src="static/btn0.png">
        </div>
        <div class="btn1">
            <img src="static/btn1.png">
        </div>
        <div class="btn2">
            <img src="static/btn2.png">
        </div>
        <div class="btn3">
            <img src="static/btn3.png">
        </div>
    </div>

    <div class="fishes">
        <img src="static/fish1.png" class="fish1">
        <img src="static/fish2.png" class="fish2">
    </div>
    <div class="clouds">
        <img src="static/cloud.png" class="cloud1">
        <img src="static/cloud.png" class="cloud2">
        <img src="static/cloud.png" class="cloud3">
        <img src="static/cloud.png" class="cloud4">
        <img src="static/cloud.png" class="cloud5">
    </div>

    <div class="title">
        <img src="static/menu-title.png">
    </div>
    <div class="info">
        <img src="static/menu-info.png">
    </div>

    <script src="https://cdn.bootcss.com/jquery/2.2.2/jquery.min.js"></script>
    <script>
        $("body").on("touchstart", function(e) {
            e.preventDefault();
            startX = e.originalEvent.changedTouches[0].pageX,
                startY = e.originalEvent.changedTouches[0].pageY;
        });
        $("body").on("touchmove", function(e) {
            e.preventDefault();
            moveEndX = e.originalEvent.changedTouches[0].pageX,
                moveEndY = e.originalEvent.changedTouches[0].pageY,
                X = moveEndX - startX,
                Y = moveEndY - startY;

            if ( Math.abs(X) > Math.abs(Y) && X > 0 ) {
                // alert("left 2 right");
            }
            else if ( Math.abs(X) > Math.abs(Y) && X < 0 ) {
                // alert("right 2 left");
            }
            else if ( Math.abs(Y) > Math.abs(X) && Y > 0) {
                window.location.href="index.html"
            }
            else if ( Math.abs(Y) > Math.abs(X) + 20 && Y < 0 ) {
                // window.location.href="menu.html"
            }
            else{
                // alert("just touch");
            }
        });
    </script>
</body>
</html>